package com.example.jf.jfapp.bean.response;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by jf on 2017/7/29.
 */

public class CommentResponse {
    //这里创建对象是为了让使用者不报空指针异常
    private List<ResultBean> result = new ArrayList<>();

    public List<ResultBean> getResult() {
        return result;
    }

    public void setResult(List<ResultBean> result) {
        this.result = result;
    }

    public void addResult(List<ResultBean> result) {
        this.result.clear();
        this.result.addAll(result);
    }

    public static class ResultBean {
        /**
         * content : 我是评论1
         * createdAt : Sat Jun 24 22:57:15 CST 2017
         * objectId : 594e7dcb570c357d06a27278
         * statusId : 594fb2980ce46300576d2db7
         * user : {"objectId":"594cc673fe88c2005f781eb8","username":"aaa"}
         */

        private String content;
        private String createdAt;
        private String objectId;
        private String statusId;
        private ResultBean resultBean;
        private UserBean user;

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getCreatedAt() {
            return createdAt;
        }

        public void setCreatedAt(String createdAt) {
            this.createdAt = createdAt;
        }

        public String getObjectId() {
            return objectId;
        }

        public void setObjectId(String objectId) {
            this.objectId = objectId;
        }

        public String getStatusId() {
            return statusId;
        }

        public void setStatusId(String statusId) {
            this.statusId = statusId;
        }

        public UserBean getUser() {
            return user;
        }

        public void setUser(UserBean user) {
            this.user = user;
        }

        public ResultBean getResultBean() {
            return resultBean;
        }

        public void setResultBean(ResultBean resultBean) {
            this.resultBean = resultBean;
        }

        public static class UserBean {
            /**
             * objectId : 594cc673fe88c2005f781eb8
             * username : aaa
             */

            private String objectId;
            private String username;
            private String imageUrl;

            public String getObjectId() {
                return objectId;
            }

            public void setObjectId(String objectId) {
                this.objectId = objectId;
            }

            public String getUsername() {
                return username;
            }

            public void setUsername(String username) {
                this.username = username;
            }

            public String getImageUrl() {
                return imageUrl;
            }

            public void setImageUrl(String imageUrl) {
                this.imageUrl = imageUrl;
            }

            @Override
            public String toString() {
                return "UserBean{" +
                        "objectId='" + objectId + '\'' +
                        ", username='" + username + '\'' +
                        ", imageUrl='" + imageUrl + '\'' +
                        '}';
            }
        }
    }
}
